import pygame
import moviepy.editor as mp
# 初始化 Pygame
pygame.init()
pygame.mixer.init()
# 屏幕尺寸
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 500
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("Dargon dnd Fly")

# 初始化字体
font = pygame.font.Font(None, 36)

# 加载图像
background_img = pygame.image.load('./img/background.png')
start_button_image = pygame.image.load('./img/start_button.png')
pause_button_image = pygame.image.load('./img/start_button.png')
pause_button_rect = pause_button_image.get_rect(center=(SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2))
player_image = pygame.image.load('./img/player.png').convert_alpha()
enemy_img1 = pygame.image.load('./img/enemy1_frame1.png')
enemy2_gif = pygame.image.load('./img/enemy2.gif')
bomb_img = pygame.image.load('./img/bomb.png')
explosion_img = pygame.image.load('./img/explosion.png')
fireball_img = pygame.image.load('./img/fireball.gif')
enemy3_image = pygame.image.load('./img/enemy3.png')
dz1_img = pygame.image.load('./img/dz1_img.png').convert_alpha()
lightning1_image = pygame.image.load('./img/lightning1.png').convert_alpha()
lightning2_image = pygame.image.load('./img/lightning2.png').convert_alpha()

# 加载音效
BGM=pygame.mixer.Sound('./sound/BGM.mp3')
hit_s=pygame.mixer.Sound('./sound/hit.mp3')
start_s=pygame.mixer.Sound('./sound/start.mp3')
hq_s=pygame.mixer.Sound('./sound/火球.mp3')
an_s=pygame.mixer.Sound('./sound/按钮.mp3')
bz_s=pygame.mixer.Sound('./sound/爆炸.mp3')
sd_s=pygame.mixer.Sound('./sound/闪电.mp3')
sd1_s=pygame.mixer.Sound('./sound/闪电1.mp3')
js_s=pygame.mixer.Sound('./sound/箭矢.mp3')
end_s=pygame.mixer.Sound('./sound/结束.mp3')
e3_s=pygame.mixer.Sound('./sound/enemy3_attack_s.mp3')

# 定义颜色
WHITE = (255, 255, 255)
RED = (255, 0, 0)